<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .aaa {
        color: red;
      }
    </style>
  </head>
  <body>
    <div class="aaa">111</div>
    <script>
      function test1() {
        return new Promise((res, rej) => {
          setTimeout(() => {
            res(111);
          }, 2000);
        });
      }
      function test2() {
        return new Promise((res, rej) => {
          setTimeout(() => {
            res(2222);
          }, 3000);
        });
      }

      function test3() {
        return new Promise((res, rej) => {
          setTimeout(() => {
            rej(2222);
          }, 4000);
        });
      }
      Promise.all([test1(), test2(), test3()]).then((res) => {
        console.log(res);
      });
      Promise.allSettled([test1(), test2(), test3()]).then((res) => {
        console.log(res);
      });

    </script>
  </body>
</html>
